package com.systemsjr.jrappointment.setting;

import com.systemsjr.jrappointment.setting.vo.SystemSettingVO;
import com.systemsjr.jrappointment.utils.ServiceUtils;
import com.systemsjr.jrappointment.utils.UIUtils;
import com.systemsjr.jrlib.richclient.BaseItemControl;

public class SettingControl extends BaseItemControl<SystemSettingVO> {
	
	public SettingControl(){
		super();
		valueHolder = UIUtils.getSettingValueHolder();
	}

	@Override
	public void handleDeleteItem(SystemSettingVO item) {
		
		ServiceUtils.getSettingService().delete(item);
	}

	@Override
	public SystemSettingVO handleNewItem() {
		
		return ServiceUtils.createDefaultSetting();
	}

	@Override
	public SystemSettingVO handleSaveItem(SystemSettingVO item) {
		// TODO Auto-generated method stub
		return ServiceUtils.getSettingService().save(item);
	}


}
